addProp(description, #theFile, [#default: "none", #format: #string, #comment: "The file to open:"])
addProp(description, #TheProgram, [#default: "none", #format: #string, #comment: "The program to open the file(its Extension):"])
return description
end
on getBehaivorDescription me
return "This behavior takes advantage of the Buddy API Xtra to locate Adobe Acrobat Reader on the users machine and then launch a pdf document from that app."
end
on mouseUp me
if theFile <> "none" then
thePath = baFindApp(TheProgram)
if thePath <> EMPTY then
if the platform contains "windows" then
else
result = baOpenFile(the pathName & theFile, "normal")
end if
if result < 32 then
case result of
0:
Err = "Out of memory"
1:
Err = "Unknown error"
2:
Err = "File not found"
3:
Err = "Path not found"
5:
Err = "Sharing or network protection error"
6:
Err = "Library required seperate data segments for each task"
8:
Err = "Insufficient memory"
10:
Err = "Windows version was incorrect"
11:
Err = "Executable file invalid"
12:
Err = "Application was designed for a different operating system"
13:
Err = "Application was designed for MS-DOS 4.0"
14:
Err = "Type of executable file unknown"
15:
Err = "Attempt was made to load a real-mode app (developed for an earlier version of Windows)"
16:
Err = "Attempt was made to load a second instance of an executable file containing multiple data segments that were not marked read-only"
19:
Err = "Attempt was made to load a compressed executable file. The file must be decompressed before loaded"
20:
Err = "DLL file was invalid. One of the DLLs required to launch this application was corrupt"